﻿using LY.Entity;
using LY.Entity.Entities;
using LY.Entity.PageSearch;
using LY.Entity.SearchEntity;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace LY.Interface
{
    public interface IMenuService
    {
        PagedList<Menu_EX> QueryMenuList(MenuSearch search, PageView view);
        List<C_Menu> GetUpperMenuList(int? id);
        DataView GetMenuView(int? id);
        C_Menu GetMenu(int? id);
        List<C_Menu> GetTopMenuList(int? id);
        /// <summary>
        /// 新增 编辑项目信息
        /// </summary>
        /// <param name="inves"></param>
        /// <returns></returns>
        int SaveMenu(C_Menu enterprise);

        List<C_Menu> GetMenuList(int? UpperID);

        int DeleteMenu(int id);

        string GetCode(string code);

        //根据栏目Id查询子栏目信息
        PagedList<C_Menu> QueryMenuListId(int? Id, ArticleSearch search, PageView view);

        //栏目列表
        PagedList<C_Menu> QueryMenuList(ArticleSearch search, PageView view);

        /// <summary>
        /// 检索投资信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<C_Menu> GetMenuSub(int? id);

        //检查Code是否已经存在
        int GetCodeNum(string code);
        int GetCodeNum(int id, string code);

        //根据栏目ID检查当前栏目下是否有文章信息
        int CheckArticle(int menuid);

        //前台获取栏目列表
        List<C_Menu> QueryMainMenuList(int id);

        List<C_Menu> QueryMainMenuListByMainMenuId(int id);

        //C_Menu GetMenuByMainMenuId(int? id);
        C_Menu GetMenuByMainMenuId(int id);

        /// <summary>
        /// 根据当前菜单的Id获取母菜单，目前只适用于2级菜单。
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        C_Menu SelectUpperMenuById(int id);

    }
}
